package club.justwill.single.persistence.support;

import java.io.Serializable;

/**
 * Created by xiangnan on 16-1-29.
 */
public class ProjectBackPK implements Serializable {
    public ProjectBackPK() {}
    private Long mainProjectId;
    private Long slaveProjectId;

    @Override
    public int hashCode() {
        int result = 17;
        result = 37 * result + (int) (mainProjectId ^ (mainProjectId >>> 32));
        result = 37 * result + (int) (slaveProjectId ^ (slaveProjectId >>> 32));
        return result;
    }

    @Override
    public boolean equals(Object o) {
        if (!(o instanceof ProjectBackPK))
            return false;
        ProjectBackPK unit = (ProjectBackPK) o;
        return unit.mainProjectId == mainProjectId
                && unit.slaveProjectId == slaveProjectId;
    }

    public Boolean canEqual(Object other) {
        return other instanceof ProjectBackPK;
    }

    public Long getMainProjectId() {
        return mainProjectId;
    }

    public void setMainProjectId(Long mainProjectId) {
        this.mainProjectId = mainProjectId;
    }

    public Long getSlaveProjectId() {
        return slaveProjectId;
    }

    public void setSlaveProjectId(Long slaveProjectId) {
        this.slaveProjectId = slaveProjectId;
    }

}
